import os
import stat
import time
def removeSvnFolder(dir):
    svnFolderName = dir+"/.svn"
    command = "rm -f -r "+svnFolderName
    os.system(command)
    print command

def traverseDir(dir):
    #print dir
    removeSvnFolder(dir)
    for fileName in os.listdir(dir):
        fullName = dir+"/"+fileName
        #print "filename:"+fullName
        fileStats = os.stat(fullName)
        if stat.S_ISDIR(fileStats[stat.ST_MODE]):
            traverseDir(fullName)


dir = "/root/project/btserver"
traverseDir(dir)

